import com.itheima.health.pojo.User;
import com.ysx.service.impl.UserServiceImpl;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Mytest {


    @Test
    public void test_01() {
//       获得两个注入的对象
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring-service.xml");
        UserServiceImpl bean = context.getBean(UserServiceImpl.class);
        User xiaoming = bean.getUserByName("xiaoming");
        System.out.println(xiaoming);

    }
}
